<?php

class Application_Form_Contacts extends Zend_Form
{
	
        public function __construct()
	{
            
            $translate = new My_Action_Helper_Lang();
            
            $this->setName('contacts');
            parent::__construct();

            $name = new Zend_Form_Element_Text('name');
            $name->setLabel($translate->_('Name'))
                    ->setRequired(true)
                    ->addValidator('NotEmpty')
                    ->addFilter('StringTrim')
                    ->addFilter('StripTags');

            $email = new Zend_Form_Element_Text('email');
            $email->setLabel($translate->_('Email'))
                    ->addFilter('StringTrim')
                    ->addFilter('StripTags');
            
            $phone = new Zend_Form_Element_Text('phone');
            $phone->setLabel($translate->_('Phone number'))
                    ->addFilter('StringTrim')
                    ->addFilter('StripTags');

            $message = new Zend_Form_Element_Textarea('message');
            $message->setLabel($translate->_('Message'))
                    ->addFilter('StringTrim')
                    ->addFilter('StripTags');
            
  
            $submit = new Zend_Form_Element_Button('button');
            $submit->setLabel($translate->_('Send'))
                   ->setAttrib('class', 'button');
    //               ->setAttrib('onclick', 'saveData();');

            $this->addElements(array($name, $email, $phone, $message, $submit));

	}
}